package com.viewsky.base.back.bean;

import com.viewsky.base.back.util.Converter;

public class Result
{
	/* 服务器ip */
	private String server;
	
	/* 自定义返回码Constant.ResultCode */
	private String code;
	
	/* 真正返回的数据 */
	private Object data;

	public String getServer() 
	{
		return server;
	}
	public void setServer(String server) 
	{
		this.server = server;
	}
	
	public String getCode()
	{
		return code;
	}
	public void setCode(String code)
	{
		this.code = code;
	}

	public Object getData()
	{
		return data;
	}
	public void setData(Object data)
	{
		this.data = data;
	}
	
	@Override
	public String toString()
	{
		String strJsonData = "";
		
		try
		{
			strJsonData = Converter.toJson(this);
		} 
		catch (Exception e)
		{
			strJsonData = super.toString();
		}
		
		return strJsonData;
	}	
}
